﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace XNA_Game_Framework
{
	public class Label : Control
	{
		SpriteFont font;
		string text;

		public SpriteFont Font
		{
			get { return font; }
			set { font = value; }
		}

		public override Vector2 Size
		{
			get { return font.MeasureString(text); }
		}

		public string Text
		{
			get { return text; }
			set { text = value; }
		}

		public Label(object parent, string name, Vector2 position, string text, SpriteFont font)
			: base(name, parent, position)
		{
			Font = font;
			Text = text;
		}

		internal override void Draw(SpriteBatch spriteBatch)
		{
			spriteBatch.DrawString(font, text, WindowPosition, Color.Black);
		}
	}
}
